﻿using System.Windows;
using System.Windows.Controls;

namespace ibba.src.slcomponentes
{
    public class CustomContentControl: ContentControl
    {
        public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register("Header", typeof(UIElement), typeof(CustomContentControl), null);
        //public delegate void ContentClosed(CustomContentControl sender);
        //public event ContentClosed OnClosed;

        //private HyperlinkButton _hlbClose;

        public CustomContentControl()
        {
            this.DefaultStyleKey = typeof(CustomContentControl); //Definindo o Tema Padrão do arquivo Generic.xaml
        }

        public UIElement Header
        {
            get { return (UIElement)this.GetValue(HeaderProperty); }
            set { this.SetValue(HeaderProperty, value); }
        }

        //Public Overrides Sub OnApplyTemplate()
        //    MyBase.OnApplyTemplate()
        //    _hlbClose = DirectCast(GetTemplateChild("hlbClose"), HyperlinkButton)
        //    AddHandler _hlbClose.Click, AddressOf hlbClose_Click
        //End Sub
        //
        //Private Sub hlbClose_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
        //    RaiseEvent Close(Me)
        //End Sub
    }
}
